home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 3282 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.6 KB

  1. Path: oxy.rust.net!usenet
  2. From: ebennett@rust.net
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Basic header file broblem in BC 4.5
  5. Date: Tue, 23 Jan 1996 05:02:27 GMT
  6. Organization: Rust Net - High Speed Internet in Detroit  810-642-2276
  7. Message-ID: <4e1fip$do7@oxy.rust.net>
  8. References: <4du8q0$k1h@yuggoth.ucsb.edu>
  9. NNTP-Posting-Host: liv-18.rust.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. "Peter V. Kharchenko" <peter@cs.ucsb.edu> wrote:
  13.  
  14. >Hi everyone,
  15.  
  16. >  I've been trying for a several days to correct my project file in some way to
  17. >make it work. Here's the situation that I have:
  18.  
  19. > I have two header files (.hpp) with little (.cpp) files corresponding to them,
  20. >and one file that includes main() function in it. I am using Borland C 4.5. I
  21. >created a project and included there two .cpp files corresponding to headers
  22. >and the main file. The problem is that Linker does not recognize the functions
  23. >described in one of the .cpp (.hpp) files.  The whole thing works perfectly if
  24. >I just attach function bodies (ones that are normally in little .cpp file) to
  25. >the .hpp file.  Anyway ..  I'll enclose the files later on.
  26.  
  27. > Actual problem:  I get  a linker error: undifined object  in task01.cpp :
  28. >stack<complex>::<complex> pop()
  29. >etc. on all the other stack functions. (notice that  all the functions
  30. >described in complex.cpp are workign just fine, it's just the stack unit that
  31. >is screwed)
  32.  
  33. This code is dealing with templates.  In order to separate the
  34. template definition from its implementation, you need to use the
  35. compilers -Jg switches.  These are discussed in the Programmers Guide.
  36.  
  37. Earl
  38.  
  39.  
  40.